package com.xy.light;

import com.xy.command.Command;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/16 20:25
 * @description
 */
public class LightOffCommand implements Command {
    // 聚合LightReceiver
    private LightReceiver light;

    public LightOffCommand(LightReceiver light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
}
